]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Include .ui files in POTFILES check
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 10 Feb 2022 17:18:34 +0000 (18:18 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sat, 12 Feb 2022 11:49:03 +0000 (11:49 +0000)
As the previous commit shows, just checking source files isn't
enough. Extending the existing check to .ui files should make
sure that we catch that kind of breakage in the future before
it hits translators.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2173>

.gitlab-ci/check-potfiles.sh

index a36fe7539b9515bf56f2f1551aaf1c1235812564..82f101cf87458b6d59a95a557a29d309f01d5442 100755 (executable)
@@ -1,10 +1,14 @@
 #!/usr/bin/env bash
 
 srcdirs="src subprojects/extensions-tool"
+uidirs="js subprojects/extensions-app"
 
 # find source files that contain gettext keywords
 files=$(grep -lR --include='*.c' '\(gettext\|[^I_)]_\)(' $srcdirs)
 
+# find ui files that contain translatable string
+files="$files "$(grep -lRi --include='*.ui' 'translatable="[ty1]' $uidirs)
+
 # filter out excluded files
 if [ -f po/POTFILES.skip ]; then
   files=$(for f in $files; do ! grep -q ^$f po/POTFILES.skip && echo $f; done)